// import http from "@/utils/http";
import https from "@/utils/https";
export const getCheckoutInfoAPI = (id = null) => {
  return https.get("/member/order/pre", { params: { id } });
};
// 创建订单
export const createOrderAPI = (data) => {
  return https({
    url: "/member/order",
    method: "POST",
    data,
  });
};
// 获取行政区域
export const getAreaAPI = (keywords) => {
  return https({
    url: `/member/address/getArea`,
    method: "GET",
    params: { keywords },
  });
};

export const addAreaAPI = (data) => {
  return https({
    url: `/member/address`,
    method: "POST",
    data,
  });
};

export const updateAreaAPI = (data) => {
  return https({
    url: `/member/address`,
    method: "PUT",
    data,
  });
};

export const delAreaAPI = (id) => {
  return https({
    url: `/member/address/${id}`,
    method: "DELETE",
  });
};
